package com.example.usage.aop.log;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jiangzhe
 * @create 2022/4/1 11:17
 */
@RestController
@RequestMapping("/work")
public class WorkController {

    @Autowired
    private WorkService workService;

    @GetMapping("/add")
    public String transAdd(@RequestParam("userId")String userId, @RequestParam("amount")int amount){
        return workService.transAdd(userId, amount);
    }
}
